const { merge } = require('webpack-merge');
const common = require('./webpack.common');
const { resolveApp } = require('./paths');

/** @type {import('webpack').Configuration} */
module.exports = merge(common, {
  // 生产模式
	mode: 'production',
	// 输出
	output: {
		// bundle 文件名称
		filename: '[name].[contenthash].bundle.js',
		// bundle 文件路径
		path: resolveApp('dist'),
		// 编译前清除目录
		clean: true,
	}
})